#include<bits/stdc++.h>
#define ___ "-------------------------------\n"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll maxn = 100000 + 5;

class Solution {
public:
    int maximumRows(vector<vector<int>>& mat, int cols) {
        int ans = 0;
        int n = mat.size(), m = mat[0].size();
        for (int i = 1; i < (1 << m); i++) {
            if (__builtin_popcount(i) == cols) {
                int temp = 0;
                for (int j = 0; j < n; j++) {
                    bool flag = true;
                    for (int k = 0; k < m; k++) {
                        if (mat[j][k] && !((1 << k) & i)) {
                            flag = false;
                            break;
                        }
                    }
                    if (flag) {
                        temp++;
                    }
                }
                ans = max(ans, temp);
            }
        }
        return ans;
    }
};  

int main(){
//    ios::sync_with_stdio(false);
//    ifstream cin("data.txt");
//    freopen("data.txt", "r", stdin);
return 0;
}

/**
 * @date 2022-09-03
 * @brief 暴力能做
 */